package com.stein;

import com.badlogic.gdx.Application;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.assets.AssetManager;
import com.stein.Game;
import com.stein.IActivityRequestHandler;
import com.stein.Screen;



public class MentalArithmetic extends Game{
	public MentalArithmeticPreferences prefs;


    public LanguageManager lang; 
    
    protected static AssetManager m_assetManager;
	public MentalArithmetic(IActivityRequestHandler handler) {
		super(handler);
		 
	} 
	public MentalArithmetic() {
		this(null);
		 
	} 
	 

	@Override
	public void create() {
		Gdx.input.setInputProcessor(this);
		Gdx.input.setCatchBackKey(true);
		super.create();
	}

public void exit() {
		
		if (Gdx.app.getType() == Application.ApplicationType.Android) {												// crasht wenn back button gedr�ckt wird :(
			
			
			//myRequestHandler.askExit(lang.getString("Exit?"), lang.getString("Do you really want to exit?"));

			exit_quit();	 
		}
		else {
			
			exit_quit();
		}
	}
	
	//----- gets called from handler after dialog ------------
	
	public void exit_quit() {
	
		
		Gdx.app.exit();
	}
	//--------------------------------------------------
	
	@Override
	public boolean keyDown(int keycode) {
		
		return false;
	}

	@Override
	public boolean keyUp(int keycode) {
		
		return false;
	}

	@Override
	public boolean keyTyped(char character) {
		
		return false;
	}

	@Override
	public boolean touchDown(int screenX, int screenY, int pointer, int button) {
		
		return false;
	}

	@Override
	public boolean touchUp(int screenX, int screenY, int pointer, int button) {
		
		return false;
	}

	@Override
	public boolean touchDragged(int screenX, int screenY, int pointer) {
		
		return false;
	}

	@Override
	public boolean mouseMoved(int screenX, int screenY) {
		
		return false;
	}

	@Override
	public boolean scrolled(int amount) {
		
		return false;
	}

	@Override
	public Screen getStartScreen() {
		
		return null;
	}
	  public MentalArithmeticPreferences getPreferences()
	  {
	      return prefs;
	  }
	  
	  
	  
	/**
	 * @return resource management system
	 */
	public static AssetManager getAssetManager() {
		return m_assetManager;
	}
		
}

